{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([  3.59376071,  11.36363636,  11.13677866])"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn import preprocessing\n",
    "import pandas as pd\n",
    "import numpy as np # we'll need it later\n",
    "#Load the Boston dataset.\n",
    "\n",
    "from sklearn.datasets import load_boston\n",
    "\n",
    "boston = load_boston()\n",
    "X,y = boston.data, boston.target\n",
    "\n",
    "X[:, :3].mean(axis=0) #mean of the first 3 features"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([  8.58828355,  23.29939569,   6.85357058])"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X[:, :3].std(axis=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([  6.34099712e-17,  -6.34319123e-16,  -2.68291099e-15])"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_2 = preprocessing.scale(X[:, :3])\n",
    "X_2.mean(axis=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 1.,  1.,  1.])"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X_2.std(axis=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0xc7e6b38>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_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+PgC+xrss/tM6KpK1w\nICf9YcPjmZiI+FHfH0v4B+CMJsczLkmb6DXBf4qIW4rVaeZvWH3Z5jAi/pfeJUfPp8LcNdHo7wNO\nkXSipKOBi4HdDYyjFpJeXry7QNIrgPOAbzc7qokQh2aeu4HF4v6lwC1rn9Aih9RW/PKs+kPaP3//\nCOyJiE/2rcs0fwP1ZZhDSb+2GjlJOgY4l94xiJHnrpHz6ItTnT7JwS9TXbPhg6iJpJPovYsPegdP\nbmh7fZJuBBaAXwVWgB3AvwJfoHcVuseAd0dE6y4bWFLb79LLel+gd1GYP1vNRNtG0tuB/wAe5uA1\nmK+i9231m2n//JXVdwktn0NJv0nvYOtRxe3zEfHXko5nxLnzF6bMzJLzwVgzs+Tc6M3MknOjNzNL\nzo3ezCw5N3ozs+Tc6M3MknOjNzNLzo3ezCy5/wc+EUtGQQXIRwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xc72dc50>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "pd.Series(X[:,2]).hist(bins=50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0xc897550>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEACAYAAACwB81wAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGK9JREFUeJzt3WuMZPV95vHvg8ckxA70IIVph4lpfCHGKyW93hh7ZUtu\nGbAhqwAvol3HudBEclZyIkfRysvYjsTmTWCQVlZ2I7+IQtzjCOI4jrKMr2AExxJxbJIMBbZnPJ4o\nHiDE00nARCEXxza/fVGnmaZOddc5darq/z99no/UmjqnTlU9/a+eX3c/dWlFBGZmt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Szwt6GauRa6VuV1HylPHwFu2OG4ea9Vnc/7\neuAjABHxJeACSQcSZ4IF/zmviHgQ+NYuhyx6nepkgsWv05mIGJSnnwVOMHwt0XYLXauamaDhWqV6\n87RfBD4zZv+4F2yN+yQXLYDPSfpzSe9KHaa06LW6KCI2YfjFCFy0w3HzXqs6n/foMU+OOWbRmQD+\nc1kHfErSa+eYp65Fr1NdydZJ0grD30C+NHJWsrXaJRM0XKuZPktH0ueA7d/1tt738wMR8YnymA8A\n34mIu2Z5220y1fCmiPimpB9iOMxOlD+ppM41U7tkGtcN7vRo/8zXao/4S+DlEfEvkq4F/h9wWeJM\nOUq2TpJeCnwc+NXyp+rkJmRqvFYzHfgRcfVu50taB34SeOsOhzwJvHzb9sFy39wy1byOb5b//r2k\nP2H4K3yrITaDXAtdq/KBtgMRsSlpGfi7Ha5j5ms1os7n/SQvfM+M1mvTNtP2/6wR8RlJH5J0YUQ8\nPcdckyx6nSZKtU6S9jEcrL8fEXePOWThazUp0zRrtchn6VwDvBe4LiJ2+ivYfw68StIlks4F3gEc\nXVTEsTulHyi/yyLpJcDbgK8sKNOOuVj8Wh0F1svTNwKVL8AFrVWdz/so8AtljjcCz2zVUXMyMdP2\nvlfSFQyfEr2IYS92/hpa9DpNzJRwnX4POB4Rv7XD+SnWatdMU63VPB9pHnlE+RTwGHCs/PhQuf9l\nwCe3HXcNw0ekTwGH5pzpBoa93L8yfEXwZ0YzAZcyfNbFw8CX552pbq4Ea3UhcF95e/cCS6nWatzn\nDfx34Je2HfPbDJ858wi7PANrUZmAX2b4ze9h4AvAGxaQ6S7gbxn+UeTHgZsyWKddMyVapzcB39v2\ntXusvD+TrVWdTNOslV94ZWbWE/4Th2ZmPeGBb2bWEx74ZmY94YFvZtYTHvhmZj3hgW9m1hMe+GZm\nPeGBb2bWE/8fhC7XHHdbbj4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xcb376d8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "pd.Series(preprocessing.scale(X[:, 2])).hist(bins=50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([  6.34099712e-17,  -6.34319123e-16,  -2.68291099e-15])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "my_scaler = preprocessing.StandardScaler()\n",
    "my_scaler.fit(X[:, :3])\n",
    "my_scaler.transform(X[:, :3]).mean(axis=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 1.,  1.,  1.])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "my_minmax_scaler = preprocessing.MinMaxScaler()\n",
    "my_minmax_scaler.fit(X[:, :3])\n",
    "my_minmax_scaler.transform(X[:, :3]).max(axis=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "my_odd_scaler = preprocessing.MinMaxScaler(feature_range=(-3.14, 3.14))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "normalized_X = preprocessing.normalize(X[:, :3]) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,\n",
       "        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(normalized_X * normalized_X).sum(axis = 1)"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
